/**
 * 
 */
package com.googlecode.pcapj.bridj;

import org.bridj.Pointer;
import org.bridj.StructObject;
import org.bridj.ann.Field;

/**
	struct pcap_addr *  next 
	  if not NULL, a pointer to the next element in the list; NULL for the last element of the list 
	 
	struct sockaddr *  addr 
	  a pointer to a struct sockaddr containing an address 
	 
	struct sockaddr *  netmask 
	  if not NULL, a pointer to a struct sockaddr that contains the netmask corresponding to the address pointed to by addr. 
	 
	struct sockaddr *  broadaddr 
	  if not NULL, a pointer to a struct sockaddr that contains the broadcast address corre� sponding to the address pointed to by addr; may be null if the interface doesn't support broadcasts 
	 
	struct sockaddr *  dstaddr 
	  if not NULL, a pointer to a struct sockaddr that contains the destination address corre� sponding to the address pointed to by addr; may be null if the interface isn't a point- to-point interface 
 */
public class pcap_addr extends StructObject {
    public pcap_addr() { super(); }
    public pcap_addr(Pointer<? extends StructObject> pointer) { super(pointer); }

    /**
     * @return
     */
    @Field(0) 
    public Pointer<pcap_addr> next() {
            return this.io.getPointerField(this, 0);
    }
    /**
     * 
     * @param next
     * @return
     */
    @Field(0) 
    public pcap_addr next(Pointer<pcap_addr> next) {
            this.io.setPointerField(this, 0, next);
            return this;
    }
    /**
     * @return
     */
    @Field(1) 
    public Pointer<sockaddr> addr() {
            return this.io.getPointerField(this, 1);
    }
    /**
     * 
     * @param addr
     * @return
     */
    @Field(1) 
    public pcap_addr addr(Pointer<sockaddr> addr) {
            this.io.setPointerField(this, 1, addr);
            return this;
    }
    /**
     * @return
     */
    @Field(2) 
    public Pointer<sockaddr> netmask() {
            return this.io.getPointerField(this, 2);
    }
    /**
     * 
     * @param netmask
     * @return
     */
    @Field(2) 
    public pcap_addr netmask(Pointer<sockaddr> netmask) {
            this.io.setPointerField(this, 2, netmask);
            return this;
    }
    
    /**
     * @return
     */
    @Field(3) 
    public Pointer<sockaddr> broadaddr() {
            return this.io.getPointerField(this, 3);
    }
    /**
     * 
     * @param broadaddr
     * @return
     */
    @Field(3) 
    public pcap_addr broadaddr(Pointer<sockaddr> broadaddr) {
            this.io.setPointerField(this, 3, broadaddr);
            return this;
    }
    
    /**
     * @return
     */
    @Field(4) 
    public Pointer<sockaddr> dstaddr() {
            return this.io.getPointerField(this, 4);
    }
    /**
     * 
     * @param dstaddr
     * @return
     */
    @Field(4) 
    public pcap_addr dstaddr(Pointer<sockaddr> dstaddr) {
            this.io.setPointerField(this, 4, dstaddr);
            return this;
    }
}
